#!/usr/bin/python
import generic_parser
'''
parser for ponychan.net
'''
class PonyChanParse(generic_parser.GenericParse):
    def __init__(self):
        generic_parser.GenericParse.__init__(self)

    def _get_slash_number(self):
        return 6

    def _url_is_picture(self,url):
        return url.count('/chan%ssrc'%self.board) == 1

    def _get_picture_path(self,picture):
        return 'http://ponychan.net/chan%ssrc/%s'%(self.board,picture)

    def _get_current_thread_url(self):
        return 'http://ponychan.net/chan%sres/%s.html' %(self.board,self.thread)
